<!doctype html>
<html>
<head>
<meta charset="utf-8">
<TITLE>论坛</TITLE>
<Link rel="stylesheet" type="text/css" href="style/style.css" />
	<script src="http://47.106.66.89:8080/js/vue.min.js"></script>
	<script src="http://47.106.66.89:8080/js/axios.min.js"></script>
	<link  href="http://47.106.66.89:8080/js/ele-2.15.7/theme-chalk/index.css" rel="stylesheet">
	<script src="http://47.106.66.89:8080/js/ele-2.15.7/index.js"></script>
	<script src="js/bbs.js"></script>
</HEAD>

<BODY>
<div id="app">

	<bbs>
		<!--      主体        -->
		<DIV class="t">
			<TABLE cellSpacing="0" cellPadding="0" width="100%">
				<TR class="tr2" align="center">
					<TD colSpan="2">论坛</TD>
					<TD style="WIDTH: 10%;">主题</TD>
					<TD style="WIDTH: 30%">最后发表</TD>
				</TR>

				<template v-for="b in boards">
					<!--       主版块       -->

					<TR class="tr3">
						<TD colspan="4">{{b.boardname}}}</TD>
					</TR>
					<!--       子版块       -->

					<TR class="tr3" v-for="sub in b.children">
						<TD width="5%">&nbsp;</TD>
						<TH align="left">
							<IMG src="image/board.gif">
							<A :href="'list.html?bid='+sub.id">{{sub.boardname}}</A>						</TH>
						<TD align="center">{{sub.topicCnt}}</TD>
						<TH>
				<SPAN>
					<A href="detail.html">{{sub.maxTopic ? sub.maxTopic.title : ''}} </A>
				</SPAN>
							<BR/>
							<SPAN>{{sub.maxTopic ? sub.maxTopic.user.cname : '' }}</SPAN>
							<SPAN class="gray">[ {{sub.maxTopic ? sub.maxTopic.publishtime : '' }} ]</SPAN>
						</TH>
					</TR>
				</template>
			</TABLE>
		</DIV>
	</bbs>
</div>
<script>
	var v = new Vue({
		el : "#app",
		data : {
			boards:[]
		},
		created() {
			axios.get("tblBoard/query").then(res=>{
				this.boards=res.data;
			});
		},
		methods : {}
	})
</script>
</BODY>
</HTML>
